﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Snowdreamist.Runtime.Services;

namespace Snowdreamist.ComponentModel.Plugin
{
    public interface IImportedPluginManager : IRuntimeService
    {
        ImportedPlugin<T> GetPlugin<T>(object instance, ContractMetadata metadata);

        ImportedPlugin<T, TMetadata> GetPlugin<T, TMetadata>(object instance, ContractMetadata metadata);

        IEnumerable<ImportedPlugin<T>> GetPlugins<T>(object instance, ContractMetadata metadata);

        IEnumerable<ImportedPlugin<T, TMetadata>> GetPlugins<T, TMetadata>(object instance, ContractMetadata metadata);

        ImportedPlugin<T> GetPlugin<T>(Type ownerType, ContractMetadata metadata);

        ImportedPlugin<T, TMetadata> GetPlugin<T, TMetadata>(Type ownerType, ContractMetadata metadata);

        IEnumerable<ImportedPlugin<T>> GetPlugins<T>(Type ownerType, ContractMetadata metadata);

        IEnumerable<ImportedPlugin<T, TMetadata>> GetPlugins<T, TMetadata>(Type ownerType, ContractMetadata metadata);

        event EventHandler<UndeterminedPluginsEventArgs> UndetermindImportedPlugin;
    }
}